package math2;

import org.junit.Test;

import fem2.Debugger;

public class PiecewiseLinearFunctionRToRTest {

	@Test
	public void test1() {

		double[] lambdaArray = MathUtilities.createLambdaArray(0, 0.1, 1);
		double[] t = MathUtilities.createLambdaArray(1.0, 1.0, 11);
		FunctionRnToR lambda = new PiecewiseLinearFunctionRToR(t, lambdaArray);

		for (int i = 0; i < 11; i++) {
			Debugger.watch(lambda.valueAt(t[i]));
		}

	}

	@Test
	public void test2() {
		FunctionRnToR lambda = new RampFunctionRToR(0, 1, 0.0, 1.0);

		for (int i = 0; i < 11; i++) {
			Debugger.watch(lambda.valueAt(i / 10.0));
		}
	}
}
